<!--
  @author yangjiangming
  @date 2018-12-10 20:40:28
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html th:replace="~{work/modify/common/layout :: layout('打款凭证', ~{::title}, ~{::content}, ~{::script})}">
<head>
    <title>工单管理-打款凭证</title>
</head>
<body>

<div th:fragment="content">
    <style>
        label.red_star:before {
            content: '* ';
            color: red;
        }
    </style>
    <form class="layui-form">
        <input type="text" name="workId" th:value="${workId}" hidden>
        <input type="text" name="orderId" th:value="${orderId}" hidden>
        <!-- 工单状态 -->
        <input type="text" name="status" th:value="${remitVoucherVO.status}" hidden>
        <!-- 工单结果  -->
        <input type="text" name="resultStatus" th:value="${remitVoucherVO.resultStatus}" hidden>

        <input type="text" id="orderPayId" name="orderPayId" th:value="${remitVoucherVO.orderPayId}" hidden>
        <input type="text" id="payerThirdAccountBank" name="payerThirdAccountBank" th:value="${remitVoucherVO.payerThirdAccountBank}" hidden>
        <input type="text" id="payerThirdAccount" name="payerThirdAccount" th:value="${remitVoucherVO.payerThirdAccount}" hidden>

        <!-- 图片 -->
        <div class="layui-form-item">
            <div class="layui-input-block layui-col-space10">
                <div class="layui-col-md2" th:each="item,ind : ${new int[2]}">
                    <block th:if="${ind.index!=1}">
                        <div class="layui-inline" style="text-align: center;/* display: block; */margin-left: -110px;">
                            <div class="layui-form-item">
                                <label class="layui-form-label red_star">凭证号：</label>
                                <div class="layui-input-block">
                                    <input th:id="|refund_no_input${ind.index}|" type="text" name="title" lay-verify=""
                                           placeholder=" 请输入支付流水" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>
                        <div class="layui-inline" style="text-align: center;/* display: block; */margin-left: -110px;">
                            <div class="layui-form-item">
                                <label class="layui-form-label red_star">凭证图：</label>
                                <div class="layui-inline">
                                    <div class="layui-upload-drag" th:id="|imageSrcUrl${ind.index}|"
                                         style="position: relative;">
                                        <div>
                                            <input type="hidden" class="img-url" th:id="|imageSrcUrl${ind.index}Value|">
                                            <i class="layui-icon"></i>
                                            <p>点击选择图片上传</p>
                                            <img th:id="|imageSrcUrl${ind.index}Values|">
                                        </div>
                                    </div>
                                    <input class="layui-upload-file" type="file" accept="image/*" name="file">
                                </div>
                                <div class="layui-inline" style="text-align: center;display: block;margin-left: 115px;">
                                    <i class="layui-icon layui-icon-search btn-review"></i>
                                    <i class="layui-icon layui-icon-delete btn-delete" th:data-index="${ind.index}"></i>
                                </div>
                            </div>
                        </div>
                        <div class="layui-inline"
                             style="/*text-align: center; */ /* display: block; */margin-left: -110px;">
                            <div class="layui-form-item">
                                <label class="layui-form-label red_star">打款银行：</label>
                                <div class="layui-input-block" style="width: 200px;">
                                    <select lay-verify="required" lay-filter="remitBankChange" lay-search>
                                        <option th:each="bankVo : ${bankVoList}"
                                                th:value="${bankVo.account}"
                                                th:text="${bankVo.name}"
                                                th:data-account="${bankVo.account}"
                                                th:data-bank="${bankVo.accountBank}"
                                                th:selected="${remitVoucherVO.payerThirdAccount == bankVo.account}"
                                        >
                                        </option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </block>
                    <block th:unless="${ind.index!=1}">
                        <div class="layui-inline">
                            <div style="padding: 70px 0px 40px 0px">
                                <span style="font-size: 12px;color: rgb(255,0,0)">最多可上传1张，每张图片<5M，支持：jpg、jpeg、png格式图片上传</span>
                            </div>
                        </div>
                    </block>
                </div>
            </div>
        </div>
        <div class="layui-form-item" style="text-align: center;">
            <button class="layui-btn " lay-submit>保存</button>
<!--            <button class="layui-btn layui-btn-primary" onclick="parent.layer.closeAll();">取消</button>-->
        </div>
    </form>
</div>

<script th:inline="javascript">

    var remitVoucherVO = [[${remitVoucherVO}]];

    var layuiModel = {
        oms_work_modify_remit_voucher: "work/modify/zmn.oms.work.modify.remit.voucher"
    };
</script>
</body>
</html>